#ifndef LOGINFRAME_H
#define LOGINFRAME_H

#include <QDialog>

#include <QTcpServer>
#include <QTcpSocket>
#include <QMessageBox>
#include <QFileDialog> // 文件对话框
#include "userinfo.h"
#include "msg.h"

namespace Ui {
class LoginFrame;
}

class LoginFrame : public QDialog
{
    Q_OBJECT

public:
    explicit LoginFrame(QWidget *parent = 0);
    ~LoginFrame();
    void setSocket(QTcpSocket* s){this->socket = s;}
    void setPtr(int *p,QString * str);


private:
    Ui::LoginFrame *ui;
    QTcpSocket* socket = NULL;
    QString username;
    UserInfo * info;
    int * ptr = NULL;
    QString * name;

private slots:
    void LoginFunction();
    void DealLoginAnswer();
};

#endif // LOGINFRAME_H
